package com.lhr.common.domain;

public abstract class AbstractServiceParam extends AbstractBean {

	private static final long serialVersionUID = 1L;
	private Integer pageItem;
	private Integer pageIndex;
	private Order order;
	private String sort;

	// EasyUI DataGrid Param
	private Integer page;
	private Integer rows;

	public AbstractServiceParam() {
		super();
		this.pageIndex = 1;
		this.order = Order.DESC;
		this.pageItem = Pagination.DEFAULT_PAGE_ITEM;
	}

	public AbstractServiceParam(Integer pageItem, Integer pageIndex, Order order, String sort) {
		super();
		this.pageItem = pageItem;
		this.pageIndex = pageIndex;
		this.order = order;
		this.sort = sort;
	}

	public void noPagination() {
		this.pageItem = -1;
	}

	/******************************************************************/
	public Integer getPage() {
		return page;
	}

	public void setPage(Integer page) {
		this.page = page;
		this.pageIndex = page;
	}

	public Integer getRows() {
		return rows;
	}

	public void setRows(Integer rows) {
		this.rows = rows;
		this.pageItem = rows;
	}

	/******************************************************************/

	public Integer getPageItem() {
		return pageItem;
	}

	public void setPageItem(Integer pageItem) {
		this.pageItem = pageItem;
	}

	public Integer getPageIndex() {
		return pageIndex;
	}

	public void setPageIndex(Integer pageIndex) {
		this.pageIndex = pageIndex;
	}

	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}

}
